<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks>
    <OutputType>Library</OutputType>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
    <Nullable>enable</Nullable>
    <NoWarn>$(NoWarn),CA1050,CA1850</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedResource Include="Templates\*.*" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
  </ItemGroup>
  <ItemGroup>
      <ProjectReference Include="$(RepoRoot)src\tasks\MobileBuildTasks\MobileBuildTasks.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="LibraryBuilder.cs" />
    <Compile Include="..\Common\Utils.cs" />
    <Compile Include="..\Common\Builders\AppBuilderTask.cs" />
    <Compile Include="..\Common\Builders\CompiledAssembly.cs" />
    <Compile Include="..\Common\LogAsErrorException.cs" />
    <Compile Include="..\AppleAppBuilder\TargetOS.cs" />
  </ItemGroup>

  <Target Name="GetFilesToPackage" Returns="@(FilesToPackage)">
    <ItemGroup>
      <_PublishFramework Remove="@(_PublishFramework)" />
      <_PublishFramework Include="$(TargetFrameworks)" />

      <!-- Copies every assembly that is in the artifacts/bin/MonoTargetsTasks/ subfolders.  Be careful not to include too much. -->
      <FilesToPackage Include="$(OutputPath)%(_PublishFramework.Identity)\*.dll" TargetPath="tasks\%(_PublishFramework.Identity)" />
      <FilesToPackage Include="$(OutputPath)%(_PublishFramework.Identity)\*.pdb" TargetPath="tasks\%(_PublishFramework.Identity)" />
    </ItemGroup>
  </Target>

</Project>
